package org.flexspeedup.event
{
import flash.events.Event;
import mx.rpc.Fault;
import mx.rpc.events.FaultEvent;
/**
 * Dispatched when there's an async fault in the boot process.
 */
public class BootFaultEvent extends Event
{
    //--------------------------------------------------------------------------
    //
    //  Class Constants
    //
    //--------------------------------------------------------------------------

    //----------------------------------
    //  ID
    //----------------------------------
    /**
     * ID is a string representation of the event type: BootErrorEvent
     */    
    public static const ID:String = "BootFaultEvent";
    
    //--------------------------------------------------------------------------
    //
    // Constructor
    //
    //--------------------------------------------------------------------------

    /**
     * Returns a new instance of this class.
     */
    public function BootFaultEvent(fault:Fault=null)
    {
        super(ID, true, true);
        _fault = fault;
    }

    //--------------------------------------------------------------------------
    //
    //  Properties
    //
    //--------------------------------------------------------------------------
    
    //----------------------------------
    //  fault
    //----------------------------------
    /**
     *  @private
     */
    private var _fault:Fault;
    
    /**
     * The <code>fault</code>
     */
    public function get fault():Fault
    {
        return _fault;
    }
    
    //--------------------------------------------------------------------------
    //
    //  Overridden Methods - Event
    //
    //--------------------------------------------------------------------------

    /**
     * @inheritDoc flash.events.Event#clone
     */
    override public function clone():Event
    {
        return new BootFaultEvent(fault);
    }
}
}